#include "stack.h"
#include <iostream>

using namespace std;

int main()
{
    Stack<int> *s = new Stack<int>(5);
    cout << "Stack Empty: " << (s->IsEmpty() ? "true" : "false") << endl;
    for (int i = 0; i < 5; i++)
    {
        bool success = s->Push(i);
        cout << "Pushed element: " << i << " Sucess: " << (success ? "true" : "false") << endl;
    }
    cout << "Stack Full: " << (s->IsFull() ? "true" : "false") << endl;
    for (int i = 0; i < 5; i++)
    {
        bool success;
        int element;
        tie(success, element) = s->Pop();
        cout << "Popped success: " << (success ? "true" : "false") << " element: " << element << endl;
    }
    for (int i = 0; i < 5; i++)
    {
        s->Push(i);
    }
    cout << "Stack Size: " << s->Size() << endl;
    s->Clear();
    cout << "Stack Empty: " << (s->IsEmpty() ? "true" : "false") << endl;
    delete s;
    return 0;
}